function FilterRoute(routerList, status) {
    // 筛选一级路由
    let res = routerList.filter(item => item.auth.includes(status))
    // 通过递归的方式对子路由筛选
    res.length > 0 && res.forEach(item => {
        if (item.children) {
            item.children = FilterRoute(item.children, status)
        }
    })

    return res
}

export {
    FilterRoute
}